package com.frame.controller;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.frame.domain.Retail;
import com.frame.service.RetailService;
import org.springframework.beans.factory.annotation.Autowired;

public class CellDataDemoHeadDataListenerRetail implements ReadListener<Retail> {

    @Autowired
    private RetailService retailService;
    public CellDataDemoHeadDataListenerRetail(RetailService retailService){
        this.retailService=retailService;
    }
    @Override
    public void invoke(Retail retail, AnalysisContext analysisContext) {
        retailService.inserRetail(retail);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.err.println("=============接续玩之后的方法");
    }
}
